Skip to content

feat: per-module timeouts, config validate, CLI polish and core refactors - #13

Merged
MikeRoss27 merged 7 commits into
mainfrom
dev
Aug 19, 2026
Merged

feat: per-module timeouts, config validate, CLI polish and core refactors#13
MikeRoss27 merged 7 commits into
mainfrom
dev

Conversation

@MikeRoss27

Copy link
Copy Markdown
Owner

Résumé

Branche dev : 21 commits depuis main, couvrant la stabilisation (Phase 1), le refactoring du core (Phase 2) et le premier point UX de la Phase 3.

Phase 1 — Stabilisation

  • fix(modules): scope enforce sur les artefacts texte via le flag explicite Artifact.Scoped (8 artefacts de cibles marqués, test de régression) — la frontière de scope ne dépend plus uniquement de l'allowlist legacy
  • fix(update): scanforge update reconstruit avec les ldflags de version et installe par-dessus le binaire en cours d'exécution
  • feat(cli): aide regroupée par commandes (groups) avec exemples ; nouvelle commande scanforge config validate
  • fix(ci): golangci-lint-action v9, Go 1.26, golangci-lint v2.12.2

Phase 2 — Refactoring core (aucun changement de comportement)

  • refactor(app): app.go éclaté en run.go, events.go, output.go, registry.go, commands.go
  • refactor(report): parsers.go éclaté par format d'entrée (scan.go, parsers_text.go, parsers_json.go, parsers_nmap.go, parsers_screenshots.go) — vérifié fonction par fonction, aucun corps altéré

Phase 3 — UX (premier point)

  • feat(config): timeouts par module via module_timeouts dans scanforge.yaml — chaque module est borné par context.WithTimeout ; au dépassement il est tué, signalé failed avec message actionnable, ses dépendants sont skipped. config validate rejette les clés inconnues. Docs en/fr/zh mises à jour.

Validation

  • go vet ./..., golangci-lint run ./... (0 issues), go test ./... — tout passe
  • Nouveaux tests : parse config (module_timeouts), timeout orchestrateur (module tué + dépendant skipped), validation config

Notes

  • Changement de schéma config : module_timeouts (optionnel, rétro-compatible — les configs existantes sans ce champ sont inchangées)
  • Pas de nouvel outil externe requis (.tools-version inchangé)

Add Artifact.Scoped so new host/URL/IP/host:port list artifacts opt into
scope filtering at their declaration site instead of relying on the
scopedTextArtifacts allowlist alone (kept as a safety net). Mark the eight
target-list artifacts Scoped: true and add a regression test proving an
unknown artifact name is filtered when Scoped is set.
…nary

go install without ldflags produced binaries reporting 0.0.1/dev/unknown,
so the update appeared to never change the version. Resolve the latest
release and commit via go list -m and git ls-remote, rebuild with the same
ldflags as the Makefile/release pipeline, and replace the running binary in
place (falling back to GOBIN with a warning). Extract updateTools for the
--tools flag.
Organize the root help into Core/Reports/Configuration/Maintenance groups
(disabling cobra command sorting), and give every subcommand a descriptive
Long description and Examples section.
scanforge config validate loads scanforge.yaml and checks the config
version, default profile resolution, custom profiles referencing only known
modules, custom tool paths existing on disk, and a parseable default scope
file, exiting non-zero on problems. Add CLI tests covering root/subcommand
help, version output and the validate command.
app.go (785 lines) is now app.go (types and options only), run.go (run
flow), events.go (orchestrator event consumption and manifest
finalization), output.go (report generation and terminal rendering),
registry.go (module wiring) and commands.go (doctor/init). Purely
mechanical: no behavior change.
parsers.go (799 lines) becomes scan.go (shared line/JSON scanning
helpers), parsers_text.go (hosts, ports, katana, whatweb, waf),
parsers_json.go (httpx, ffuf, nuclei, techcve, httpcheck, dnsx, tlsx,
jssecrets, jsverify), parsers_nmap.go (XML collection) and
parsers_screenshots.go. Verified function-by-function against the
original: no missing or altered bodies.
Bound each module invocation with context.WithTimeout when a
module_timeouts entry is configured in scanforge.yaml; a module
exceeding its limit is killed, reported as failed with an actionable
message, and its dependents are skipped. Zero/unset keeps the module's
own default. config validate now rejects unknown module names in
module_timeouts. Docs updated (en/fr/zh).
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@MikeRoss27, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e28a30c-100a-4566-a5c2-311aca6c7492

📥 Commits

Reviewing files that changed from the base of the PR and between 158a20a and 9a358f1.

📒 Files selected for processing (46)
  • AGENTS.md
  • docs/USAGE.md
  • docs/fr/USAGE.md
  • docs/zh/USAGE.md
  • internal/app/app.go
  • internal/app/commands.go
  • internal/app/config.go
  • internal/app/config_test.go
  • internal/app/events.go
  • internal/app/output.go
  • internal/app/registry.go
  • internal/app/run.go
  • internal/app/update.go
  • internal/app/update_test.go
  • internal/cli/auth.go
  • internal/cli/cli_test.go
  • internal/cli/config.go
  • internal/cli/diff.go
  • internal/cli/doctor.go
  • internal/cli/export.go
  • internal/cli/init.go
  • internal/cli/plan.go
  • internal/cli/root.go
  • internal/cli/run.go
  • internal/cli/update.go
  • internal/cli/version.go
  • internal/config/config.go
  • internal/config/config_test.go
  • internal/config/defaults.go
  • internal/modules/attacksurface/attacksurface.go
  • internal/modules/context.go
  • internal/modules/context_test.go
  • internal/modules/dnsbrute/dnsbrute.go
  • internal/modules/dnsx/dnsx.go
  • internal/modules/gau/gau.go
  • internal/modules/httpx/httpx.go
  • internal/modules/katana/katana.go
  • internal/modules/naabu/naabu.go
  • internal/modules/subfinder/subfinder.go
  • internal/orchestrator/orchestrator.go
  • internal/orchestrator/orchestrator_test.go
  • internal/report/parsers_json.go
  • internal/report/parsers_nmap.go
  • internal/report/parsers_screenshots.go
  • internal/report/parsers_text.go
  • internal/report/scan.go
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch dev
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MikeRoss27
MikeRoss27 merged commit 9337ceb into main Aug 19, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant